<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: jun
  Date: 2023/6/9
  Time: 7:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
<%--    <script type="text/javascript">--%>
<%--        //添加公告--%>
<%--        function addNotice() {--%>
<%--            window.location.href = "${pageContext.request.contextPath}/admin/login/home.jsp?item=<%="notice_add"%>";--%>
<%--        }--%>
<%--    </script>--%>
</head>
<body>
<form id="Form1" name="Form1" action="" method="post">
    <table cellSpacing="1" cellPadding="0" width="100%" align="center" bgColor="#f5fafe" border="0">
        <tr>
            <td align="center" bgColor="#afd1f3"><strong>用 户 列 表</strong></td>
        </tr>
<%--        <tr>--%>
<%--            <td align="right">--%>
<%--                <button type="button" id="add" name="add" value="添加"--%>
<%--                        onclick="addNotice()">--%>
<%--                    添加</button>--%>
<%--            </td>--%>
<%--        </tr>--%>
        <tr>
            <td align="center" bgColor="#f5fafe">
                <table cellspacing="0" cellpadding="1" rules="all"
                       bordercolor="gray" border="1" id="DataGrid1"
                       style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; WIDTH: 100%; WORD-BREAK: break-all; BORDER-BOTTOM: gray 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #f5fafe; WORD-WRAP: break-word">
                    <tr
                            style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; HEIGHT: 25px; BACKGROUND-COLOR: #afd1f3">
                        <td align="center" width="10%">用户id</td>
                        <td align="center" width="18%">用户名</td>
                        <td align="center" width="18%">性别</td>
                        <td align="center" width="30%">邮箱</td>
                        <td align="center" width="9%">电话</td>
                        <td align="center" width="9%">角色</td>
                        <td width="8%" align="center">查看详情</td>
<%--                        <td width="8%" align="center">删除</td>--%>
                    </tr>
                    <c:forEach items="${userList}" var="user">
                        <tr onmouseover="this.style.backgroundColor = 'white'"
                            onmouseout="this.style.backgroundColor = '#F5FAFE';">
                            <td style="CURSOR: hand; HEIGHT: 22px" align="center"
                                width="200">
                                    ${user.getId()}
                            </td>
                            <td style="CURSOR: hand; HEIGHT: 22px" align="center"
                                width="18%">
                                    ${user.getUsername()}
                            </td>
                            <td style="CURSOR: hand; HEIGHT: 22px" align="center"
                                width="18%">
                                    ${user.getGender()}
                            </td>
                            <td style="CURSOR: hand; HEIGHT: 22px" align="center" width="8%">
                                    ${user.getEmail()}
                            </td>
                            <td style="CURSOR: hand; HEIGHT: 22px" align="center" width="8%">
                                    ${user.getTelephone()}
                            </td>
                            <td style="CURSOR: hand; HEIGHT: 22px" align="center" width="8%">
                                    ${user.getRole()}
                            </td>
                            <!-- 编辑 -->
                            <td align="center" style="HEIGHT: 22px" width="7%">
                                <a href="${pageContext.request.contextPath}/FindUserByName?name=${user.getUsername()}">
                                    <img
                                            src="${pageContext.request.contextPath}/admin/resources/img/icon1.png"
                                            width="16" height="16" border="0" style="CURSOR: hand">
                                </a>
                            </td>
                            <!-- 删除 -->
<%--                            <td align="center" style="HEIGHT: 22px" width="7%">--%>
<%--                                <a href="${pageContext.request.contextPath}/DelNoticeByIdServlet?id=${notice.getId()}">--%>
<%--                                    <img--%>
<%--                                            src="${pageContext.request.contextPath}/admin/resources/img/error.jpg"--%>
<%--                                            width="16" height="16" border="0" style="CURSOR: hand">--%>
<%--                                </a>--%>
<%--                            </td>--%>
                        </tr>
                    </c:forEach>
                </table>
            </td>
        </tr>
    </table>
</form>
</body>
</html>


